<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('mobile')->default('')->comment('手机号');
            $table->string('nickname')->default('')->comment('名称');
            $table->string('icon')->default('')->comment('头像');
            $table->decimal('balance')->default(0)->comment('余额');
            $table->string('openid')->default('')->comment('微信openID');
            $table->integer('sign_in')->default(0)->comment('签到');
            $table->boolean('is_admin')->default(0)->comment('是否为管理员');
            $table->string('identity')->default('')->comment('身份证');
            $table->string('address')->default('')->comment('地址');
            $table->string('name')->default('')->comment('姓名');
            $table->integer('invite')->default(0)->comment('邀请用户');
            $table->string('remark')->default('')->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
